#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2024/3/26 19:14
# @Author : 闫峰
# @File    : hand_task.py
from testcases.monitor.aliexpress.pop.pop_choice_products_list_syc_x import Test



def worker(num):
    """子进程要执行的任务"""
    print(f"Worker {num} is running")
    t = Test()
    t.test__()




if __name__ == '__main__':

    import multiprocessing

    # 创建进程池，最大进程数为19
    pool = multiprocessing.Pool(processes=19)

    # 启动19个子进程，每个子进程执行worker函数
    for i in range(19):
        pool.apply_async(worker, args=(i,))

    # 关闭进程池，不再接受新的任务
    pool.close()

    # 等待所有子进程执行完毕
    pool.join()

    print("All workers are done")
